package com.xinghen.security.core.validate.code;

import org.springframework.web.context.request.ServletWebRequest;

/**
 * @author xinghen
 * @ClassName: ValidateCodeProcessor
 * @Package: com.xinghen.security.core.validate.code
 * @Description 验证码处理器接口，封装不同校验码的处理逻辑
 * @create 2018-04-18 14:36
 */
public interface ValidateCodeProcessor {

    /**
     * 创建验证码
     *
     * @param request
     * @throws Exception
     */
    void create(ServletWebRequest request) throws Exception;

    /**
     * 校验验证码(校验后删除)
     *
     * @param request
     */
    void validate(ServletWebRequest request);

    /**
     * 校验验证码(校验后不删除)
     *
     * @param request
     */
    void check(ServletWebRequest request);

}
